package com.breakfast.fun.ui.user.coupon;

import com.breakfast.fun.data.entity.user.coupon.Coupon;
import com.breakfast.fun.util.Api;
import com.breakfast.fun.util.RxSchedulers;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 2016/11/9.
 */

public class CouponModel implements CouponContract.Model {

    @Override
    public Observable<Coupon> getCouponModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getCouponModel(map)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<Coupon> getCouponTimeOutModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getCouponTimeOutModel(map)
                .compose(RxSchedulers.io_main());
    }


}
